package com.dw.security;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;

/**
 * @author zhangjing
 * @date 2020/8/21 16:05
 * @Description
 */
public class StatelessDefaultSubjectFactory extends DefaultWebSubjectFactory {

    @Override
    public Subject createSubject(SubjectContext context) {
        //禁用Session
        context.setSessionCreationEnabled(false);
        return super.createSubject(context);
    }
}
